//
//  RxEventTypealias.swift
//  RxObjectDemo
//
//  Created by CaryaLiu on 2021/2/23.
//

import CoreLocation.CLLocationManagerDelegate

///  1.BMKLocationManager:didChangeAuthorizationStatus:
///  2.BMKLocationManagerDidChangeAuthorization:
///
///  Discussion:
///    Invoked when the authorization status or accuracy authorization changes for this application.
public typealias BMKAuthorizationEvent = (manager: BMKLocationManager, status: CLAuthorizationStatus)

///  BMKLocationManager:didFailWithError:
///
///  Discussion:
///    Invoked when an error has occurred. Error types are defined in "CLError.h".
public typealias BMKErrorEvent = (manager: BMKLocationManager, error: Error?)

///  BMKLocationManager:didUpdateLocation:orError:
///
///  Discussion:
///    Invoked when location update.
public typealias BMKLocationEvent = (manager: BMKLocationManager, location: BMKLocation?, error: Error?)

///  BMKLocationManager:didUpdateHeading:
///
///  Discussion:
///    Invoked when a new heading is available.
public typealias BMKUpdateHeadingEvent = (manager: BMKLocationManager, heading: CLHeading?)

///  BMKLocationManager:didUpdateNetworkState:orError:
///
///  Discussion:
///    Invoked when network changed.
public typealias BMKUpdateNetworkStateEvent = (manager: BMKLocationManager, state: BMKLocationNetworkState, error: Error?)

/// BMKLocationManager:doRequestAlwaysAuthorization:
///
/// Discussion:
/// In plist, when config `NSLocationAlwaysUsageDescription` or `NSLocationAlwaysAndWhenInUseUsageDescription`, should call `locationManager.requestAlwaysAuthorization` when received this event
public typealias BMKRequestAlwaysAuthorizationEvent = (manager: BMKLocationManager, locationManager: CLLocationManager)
